Skip to content

Implement embedded runtime epic#81

Merged
KSemenenko merged 6 commits intomainfrom
codex/epic-12-embedded-runtime
Mar 14, 2026
Merged

Implement embedded runtime epic#81
KSemenenko merged 6 commits intomainfrom
codex/epic-12-embedded-runtime

Conversation

@KSemenenko
Copy link
Member

Summary

  • embed the localhost Orleans runtime host and register the core grains in a dedicated runtime-host DLL
  • integrate Microsoft Agent Framework orchestration with local-first checkpoint, replay, and resume flows
  • add explicit embedded-runtime traffic policy visibility and enforcement, plus docs and tests for every direct child issue in epic #12

Notes

  • #26 is implemented honestly with explicit traffic-policy modeling and graph output in the current runtime slice.
  • ManagedCode.Orleans.Graph was not added because its current public package line targets Orleans 9.x and is incompatible with the repo-pinned Orleans 10.0.1 stack.

Verification

  • dotnet build DotPilot.slnx -warnaserror -m:1 -p:BuildInParallel=false
  • dotnet test DotPilot.slnx
  • dotnet format DotPilot.slnx --verify-no-changes
  • dotnet test DotPilot.Tests/DotPilot.Tests.csproj --settings DotPilot.Tests/coverlet.runsettings --collect:"XPlat Code Coverage"

Closes #12
Closes #24
Closes #25
Closes #26
Closes #27

Copilot AI review requested due to automatic review settings March 14, 2026 00:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements the embedded runtime epic (#12) by embedding a localhost-only Orleans host in a dedicated runtime-host library, integrating Microsoft Agent Framework orchestration with local-first persistence/replay/resume, and documenting/testing the runtime slice while keeping the Uno app presentation-only and browser-safe.

Changes:

  • Add DotPilot.Runtime.Host with embedded Orleans silo configuration, initial grain set, and explicit traffic-policy catalog/visualization.
  • Add Agent Framework–backed runtime client plus local session archive persistence (archive.json, replay.md, checkpoints) with restart-safe resume.
  • Expand contracts/docs/tests to cover epic #12 child issues (#24#27) and enforce desktop-vs-browser composition boundaries.

Reviewed changes

Copilot reviewed 56 out of 56 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
issue-24-embedded-orleans-host.plan.md Planning artifact for issue #24 implementation scope, risks, and verification.
epic-12-embedded-runtime.plan.md Planning artifact for epic #12 covering child issues #24#27 and validation.
docs/Features/embedded-runtime-orchestration.md Documents orchestration, persistence, and policy flows with Mermaid diagrams.
docs/Features/embedded-orleans-host.md Documents embedded Orleans host boundary, local-first constraints, and verification.
docs/Architecture.md Updates architecture map to include DotPilot.Runtime.Host, policy, and persistence slices.
docs/ADR/ADR-0003-vertical-slices-and-ui-only-uno-app.md Extends ADR to include DotPilot.Runtime.Host as desktop-only host slice.
DotPilot/DotPilot.csproj Conditionally references DotPilot.Runtime.Host for non-browser targets.
DotPilot/App.xaml.cs Adds desktop-only embedded runtime host wiring + desktop/browser runtime foundation DI split.
DotPilot.slnx Adds DotPilot.Runtime.Host project to the solution.
DotPilot.Tests/coverlet.runsettings Adjusts coverlet setting to avoid zeroed reports from mixed-source assemblies.
DotPilot.Tests/RuntimeFoundationCatalogTests.cs Updates catalog sequencing assertions and adds deterministic client negative-path tests for new APIs.
DotPilot.Tests/GlobalUsings.cs Adds global using for runtime-host slice types in tests.
DotPilot.Tests/Features/RuntimeFoundation/EmbeddedRuntimeTrafficPolicyCatalogTests.cs Adds tests for traffic policy snapshot, evaluation, and Mermaid output.
DotPilot.Tests/Features/RuntimeFoundation/EmbeddedRuntimeHostTests.cs Adds lifecycle and grain round-trip tests for embedded host + in-memory volatility.
DotPilot.Tests/Features/RuntimeFoundation/AgentFrameworkRuntimeClientTests.cs Adds orchestration/persistence/resume tests and checkpoint filename parsing tests.
DotPilot.Tests/DotPilot.Tests.csproj References DotPilot.Runtime.Host so tests can start embedded silo and query grains.
DotPilot.Tests/ControlPlaneDomainContractsTests.cs Extends domain contract tests to include policy descriptor/id coverage.
DotPilot.Runtime/Features/RuntimeFoundation/RuntimeSessionArchiveStore.cs Implements local filesystem persistence for session archive + replay markdown + checkpoint directory.
DotPilot.Runtime/Features/RuntimeFoundation/RuntimePersistenceOptions.cs Defines default runtime persistence root under LocalApplicationData.
DotPilot.Runtime/Features/RuntimeFoundation/RuntimeFoundationServiceCollectionExtensions.cs Adds DI helpers for desktop (Agent Framework) vs browser (deterministic) runtime composition.
DotPilot.Runtime/Features/RuntimeFoundation/RuntimeFoundationCatalog.cs Updates runtime foundation snapshot to include policy + session persistence slices.
DotPilot.Runtime/Features/RuntimeFoundation/DeterministicAgentTurnEngine.cs Extracts deterministic turn behavior into an engine (shared validation + artifact generation).
DotPilot.Runtime/Features/RuntimeFoundation/DeterministicAgentRuntimeClient.cs Refactors deterministic client to use the new engine and implements new interface members.
DotPilot.Runtime/Features/RuntimeFoundation/AgentFrameworkRuntimeClient.cs Adds Agent Framework workflow orchestration + checkpoint resolution + archive/grain upserts.
DotPilot.Runtime/DotPilot.Runtime.csproj Adds Agent Framework and Orleans abstractions package references for orchestration client integration.
DotPilot.Runtime/AGENTS.md Reinforces local-first Orleans host constraints as runtime guidance.
DotPilot.Runtime.Host/Features/RuntimeFoundation/WorkspaceGrain.cs Implements workspace grain using in-memory Orleans persistent state provider.
DotPilot.Runtime.Host/Features/RuntimeFoundation/SessionGrain.cs Implements session grain using in-memory Orleans persistent state provider.
DotPilot.Runtime.Host/Features/RuntimeFoundation/PolicyGrain.cs Implements policy grain using in-memory Orleans persistent state provider.
DotPilot.Runtime.Host/Features/RuntimeFoundation/FleetGrain.cs Implements fleet grain using in-memory Orleans persistent state provider.
DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeTrafficPolicyCatalog.cs Exposes policy snapshot + evaluation API via DI.
DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeTrafficPolicy.cs Defines allowed transitions and Mermaid graph output for traffic-policy visibility.
DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeHostOptions.cs Defines configurable cluster/service/port options for embedded silo.
DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeHostNames.cs Centralizes host constants (names, defaults, summaries, guard message prefix).
DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeHostLifecycleService.cs Updates host catalog state on start/stop.
DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeHostCatalog.cs Provides a snapshot of embedded runtime host status/config/grain inventory.
DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeHostBuilderExtensions.cs Adds UseDotPilotEmbeddedRuntime host builder extension + localhost/in-memory silo config.
DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeGrainGuards.cs Enforces grain primary key ↔ descriptor id consistency.
DotPilot.Runtime.Host/Features/RuntimeFoundation/ArtifactGrain.cs Implements artifact grain using in-memory Orleans persistent state provider.
DotPilot.Runtime.Host/DotPilot.Runtime.Host.csproj New project for desktop-only embedded Orleans host with required Orleans packages.
DotPilot.Runtime.Host/AGENTS.md Defines runtime-host project boundaries and local-first constraints.
DotPilot.Core/Features/RuntimeFoundation/RuntimeSessionArchiveContracts.cs Adds archive/replay/resume contracts to the shared runtime foundation surface.
DotPilot.Core/Features/RuntimeFoundation/RuntimeFoundationIssues.cs Adds issue numbers for traffic policy (#26) and session persistence (#27).
DotPilot.Core/Features/RuntimeFoundation/IAgentRuntimeClient.cs Extends runtime client interface with resume + archive query APIs.
DotPilot.Core/Features/RuntimeFoundation/EmbeddedRuntimeTrafficPolicyContracts.cs Adds shared contracts for traffic policy snapshots, probes, and decisions.
DotPilot.Core/Features/RuntimeFoundation/EmbeddedRuntimeHostContracts.cs Adds shared contracts for embedded host snapshot + initial grain interfaces.
DotPilot.Core/Features/RuntimeCommunication/RuntimeCommunicationProblems.cs Adds new problems for archive missing/corruption and missing resume checkpoint.
DotPilot.Core/Features/RuntimeCommunication/RuntimeCommunicationProblemCode.cs Adds new problem codes for session archive and resume checkpoint failures.
DotPilot.Core/Features/ControlPlaneDomain/SessionExecutionContracts.cs Adds Orleans serializer metadata + array-backed fields for Orleans-safe DTOs.
DotPilot.Core/Features/ControlPlaneDomain/ProviderAndToolContracts.cs Adds Orleans serializer metadata + array-backed fields for Orleans-safe DTOs.
DotPilot.Core/Features/ControlPlaneDomain/PolicyContracts.cs Introduces policy descriptor contract with Orleans serializer metadata.
DotPilot.Core/Features/ControlPlaneDomain/ParticipantContracts.cs Adds Orleans serializer metadata + array-backed fields for Orleans-safe DTOs.
DotPilot.Core/Features/ControlPlaneDomain/ControlPlaneIdentifiers.cs Adds Orleans serializer metadata and introduces PolicyId.
DotPilot.Core/DotPilot.Core.csproj Adds Orleans abstractions reference for grain interface contracts.
Directory.Packages.props Centralizes versions for Agent Framework and Orleans 10.0.1 packages.
AGENTS.md Adds governance + scoping rules for epic PRs and introduces DotPilot.Runtime.Host project to agent guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c00b07c169

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…d-runtime

# Conflicts:
#	AGENTS.md
#	Directory.Packages.props
#	DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeHostBuilderExtensions.cs
#	DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeHostLifecycleService.cs
#	DotPilot.Runtime.Host/Features/RuntimeFoundation/EmbeddedRuntimeHostNames.cs
#	DotPilot.Runtime/Features/RuntimeFoundation/DeterministicAgentRuntimeClient.cs
#	DotPilot.Runtime/Features/RuntimeFoundation/RuntimeFoundationCatalog.cs
#	DotPilot.Tests/Features/RuntimeFoundation/EmbeddedRuntimeHostTests.cs
#	DotPilot.Tests/Features/RuntimeFoundation/RuntimeFoundationCatalogTests.cs
#	DotPilot/App.xaml.cs
#	docs/Architecture.md
#	docs/Features/embedded-orleans-host.md
#	issue-24-embedded-orleans-host.plan.md
@KSemenenko KSemenenko merged commit 2be757f into main Mar 14, 2026
4 checks passed
@KSemenenko KSemenenko deleted the codex/epic-12-embedded-runtime branch March 14, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants